package com.sxhuangjiang.websocketdemo.config;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.socket.server.standard.ServerEndpointExporter;

/**
 * websocket 配置类。
 * @author huang
 * @version V1.0
 * @date 2019-12-03 9:05
 */
@Configuration
public class WebSocketConfig {

    /**
     * 注入ServerEndpointExporter，开启WebSocket支持。
     * @return
     */
    @Bean
    public ServerEndpointExporter serverEndpointExporter(){
        return new ServerEndpointExporter();
    }
}
